package com.wut.clock.service.impl;

import com.github.pagehelper.PageHelper;
import com.wut.clock.mapper.MessageMapper;
import com.wut.clock.service.IMessageService;
import com.wut.clock.vo.admin.MessageVo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ZYH
 * @unit D9Lab
 * @description 消息实现类
 * @date 2022/6/1 17:08
 */
@Service
@RequiredArgsConstructor
public class MessageServiceImpl implements IMessageService {

    private final MessageMapper messageMapper;

    @Override
    public List<MessageVo> getMessageList(Integer pageNum, Integer pageSize, Integer userId, Integer fromUserId, Integer targetType, Integer type, String content, Integer status) {
        PageHelper.startPage(pageNum,pageSize);
        return messageMapper.getMessageList(userId, fromUserId, targetType, type, content, status);
    }
}
